gentypes: zero out structure in _dispose function
authorWei Liu <wei.liu2@citrix.com>
Wed, 25 Feb 2015 14:56:03 +0000 (14:56 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 2 Mar 2015 17:05:39 +0000 (17:05 +0000)
commitd0b80baa985b516fb08ca206c69c5905e816cceb
tree71bd2b15e3ab9aa6443bf99131112daad8660a06
parent1ea68f1a82ef94b3cc644fa70307c5151f356baf
gentypes: zero out structure in _dispose function

Original the structure was memset to a poison value. That prevented
_dispose to be made idempotent. We should stop doing so.

Memseting the structure to 0 makes all pointers in structure become
NULL, which can be handled by free().

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/gentypes.py